// utils/catchAsync.js
module.exports = (fn) => {
    return (req, res, next) => {
      fn(req, res, next).catch(next);
    };
  };

  console.log('catchAsync exported as:', typeof module.exports); // 应该输出 "function"